home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
Other Langs
/
MacPerl ƒ
/
Perl Source ƒ
/
MacPerl
/
MPUtils.h
< prev
next >
Wrap
Text File
|
1993-12-09
|
3KB
|
99 lines
/*********************************************************************
Project : MacPerl - Real Perl Application
File : MPUtils.h -
Author : Matthias Neeracher
A lot of this code is borrowed from 7Edit written by
Apple Developer Support UK
Started : 17Mar93 Language : MPW C
Modified : 17Mar93 MN
29May93 MN Compiles correctly
14Aug93 MN OpenPreferences
17Aug93 MN DoPrefsDialog
28Sep93 MN PlotResMiniIcon
Last : 17Aug93
*********************************************************************/
#ifndef __MPUTILS__
#define __MPUTILS__
#include <Types.h>
#include <QuickDraw.h>
#include <Packages.h>
#include <GestaltEqu.h>
#include <Editions.h>
#include <Printing.h>
#ifndef __MPGLOBALS__
#include "MPGlobals.h"
#endif
pascal Boolean CheckEnvironment();
pascal void ShowError(Str255 theError,
long theErrorCode);
pascal Boolean FeatureIsImplemented(OSType theFeature,
short theTestBit);
pascal void GetTempFileName(DPtr aDoc,
Str255 newString);
pascal Boolean Ours(WindowPtr aWindow);
pascal void SetShortMenus();
pascal void SetLongMenus();
pascal void SetEditMenu(DPtr theDoc);
pascal void AdornDefaultButton(DialogPtr theDialog, short theItem);
pascal void DrawDefaultOutline(DialogPtr theDialog, short theItem);
pascal void Separator(DialogPtr dlg, short item);
pascal void RetrieveText(DialogPtr aDialog,
short anItem,
Str255 aString);
pascal void SetText( DialogPtr aDialog,
short itemNo,
Str255 theString);
pascal void GetRectOfDialogItem(DialogPtr theDialog, short theItem, Rect *theRect);
#define LesserOf(A,B) ((A<B) ? A : B)
#define GreaterOf(A,B) ((A>B) ? A : B)
pascal Boolean DoPageSetup(DPtr theDoc);
pascal Boolean CtrlKeyPressed(const EventRecord *theEvent);
pascal Boolean OptionKeyPressed(const EventRecord *theEvent);
pascal void DoAbout();
pascal void RegisterDocument(DPtr doc);
pascal void UnregisterDocument(DPtr doc);
pascal void SetupWindowMenu();
pascal void DoSelectWindow(short item);
#ifdef RUNTIME
typedef enum {iconPlain, iconGray, iconHilited} IconMode;
pascal void PlotResMiniIcon(short id, Rect * within);
pascal void PlotResICN_(short id, Rect * within, IconMode mode);
pascal void Append_DITL(DialogPtr dialog, short item_list_ID);
pascal void Shorten_DITL(DialogPtr dialog, short shorten);
pascal short Count_DITL(DialogPtr dialog);
#endif
pascal Boolean WeirdChar(const EventRecord * ev, short modifiers, char ch);
#endif